﻿$(document).ready(function(){

	/* Adding a colortip to any tag with a title attribute: */

	$('[title]').colorTip({color:'black',timeout: 10});

});
function numbersonly(myfield, e) {
        var key;
        var keychar;

        if (window.event)
            key = window.event.keyCode;
        else if (e)
            key = e.which;
        else
            return true;
        keychar = String.fromCharCode(key);

        // control keys
        if ((key == null) || (key == 0) || (key == 8) ||
	    (key == 9) || (key == 27))
            return true;

        // numbers
        else if ((("0123456789").indexOf(keychar) > -1))
            return true;
            
        else
            return false;
    }
function search_book() {
        if ($.trim($("#key").val()) == "" ) {
            alert("Vui lòng nhập từ khoá để tìm kiếm !");
        }else{
			document.getElementById("func").submit();
		}
    }	